open(FH,"</Users/yaping/Documents/workspace/data/imprinting_gene/imprinted_gene_hg18.bed");
my @in=<FH>;
chomp(@in);
close(FH);
my @out;
foreach my $line(@in){
	my @splitin=split "\t",$line;
	my $chr=$splitin[0];
	my $start=$splitin[1];
	my $end=$splitin[2];
	my $name=$splitin[3];
	my $table_name="features_".$chr;
	push(@out,"INSERT INTO `$table_name` VALUES ('imprinting',$start,$end,'+',0,'NULL',0,'$name');\n");
	
}
open(OUT,">/Users/yaping/Documents/workspace/data/imprinting_gene/imprinted_gene_hg18.sql");
print OUT @out;
close(OUT);

